<template>
    <div class="sale-order">
        <div class="ment">
            订单完成后24小时内有问题方可申请售后
        </div>
        <!-- <div class="line"></div> -->
        <div class="listm">
            <ul>
                <li v-for="(item,index) in list" @click="gotoSaleDtl(item.id)">
                    <div class="top">
                        <p class="word">{{item.startDate}}</p>
                    </div>
                    <div class="center clearfix">
                        <div class="img fl">
                            <img :src="item.picture" alt="">
                        </div>
                            <div class="title fl">
                                <p class="tits">{{item.tourTitle}}</p>
                            </div>
                        </div>
                        <div class="fott clearfix">
                            <!-- <p class="lefts fl">该旅游订单已超过售后期</p> -->
                            <p class="rght fr">申请售后</p>
                        </div>
                </li>
            </ul>
        </div>

    </div>
</template>

<script>
import http from "@/assets/js/axios";
import httpr from "@/assets/js/axiosr";
import { domain } from '@/assets/js/config'
import $ from 'jquery'
import { Toast } from 'mint-ui';
export default {
    data() {
        return {
            isAshow: false,
            isBshow: false,
            isCshow: false,
            userToken: '',
            list: [],
            queryParam: {
                page: '0',
                size: '10'
            },
        }
    },
    components: {

    },
    mounted() {
        let userToken = localStorage.getItem("token") || ''
        this.userToken = userToken
        // if (!this.userToken) {
        //     this.$router.push('/index')
        // }
        this.saleListNow()
    },
    methods: {
        direct: function (val) {
            this.$router.push({ path: '/' + val });
        },
        saleListNow: async function () {
            const res = await httpr.post('tour_order_search/my_complainAble_list?token=' + this.userToken, this.queryParam)
            // console.log(res);
            if (res.data.code == 100) {
                // Toast({ message: res.data.message, duration: 1000 })
                this.list = res.data.data.list
            } else {
                Toast({ message: res.data.message, duration: 1000 })
            }
        },
        gotoSaleDtl: function (pid) {
            this.$router.push({ path: '/saleDetails', query: { 'id': pid } })
        }
    }
}
</script>

<style lang="stylus" scoped>
.sale-order {
    .line {
        width: 100%;
        height: 12px;
        background: rgba(240, 240, 240, 1);
    }

    .ment {
        width: 100%;
        height: 44px;
        line-height: 44px;
        padding: 0 15px;
        background: rgba(240, 240, 240, 1);
        font-size: 14px;
        font-family: PingFangSC-Regular;
        font-weight: 400;
        color: rgba(0, 0, 0, 1);
    }

    .listm {
        ul {
            li {
                padding: 0 13px;
                border-bottom: 10px solid rgba(240, 240, 240, 1);

                .top {
                    width: 100%;
                    height: 40px;
                    line-height: 40px;
                    border-bottom: 1px solid rgba(240, 240, 240, 1);

                    .word {
                        font-size: 14px;
                        font-family: PingFangSC-Regular;
                        font-weight: 400;
                        color: rgba(51, 51, 51, 1);
                    }
                }

                .center {
                    border-bottom: 1px solid rgba(240, 240, 240, 1);
                    margin-top: 10px;
                    padding-bottom: 10px;

                    .img {
                        width: 80px;
                        height: 80px;

                        img {
                            width: 80px;
                            height: 100%;
                        }
                    }

                    .title {
                        margin-left: 10px;
                        width: 240px;

                        .tits {
                            font-size: 12px;
                            font-family: PingFangSC-Regular;
                            font-weight: 400;
                            color: rgba(51, 51, 51, 1);
                        }
                    }
                }

                .fott {
                    margin: 10px 0;

                    p.lefts {
                        font-size: 14px;
                        font-family: PingFangSC-Regular;
                        font-weight: 400;
                        color: rgba(153, 153, 153, 1);
                    }

                    p.rght {
                        margin-right: 10px;
                        width: 90px;
                        height: 35px;
                        line-height: 35px;
                        text-align: center;
                        background: rgba(255, 255, 255, 1);
                        border-radius: 5px;
                        border: 1px solid #999;
                        font-size: 14px;
                        font-family: PingFangSC-Regular;
                        font-weight: 400;
                        color: rgba(153, 153, 153, 1);
                    }
                }
            }
        }
    }
}
</style>
